

<%@ page import="sedh.project.User" %>
<html>
    <head>
        <g:render template="/header"/>
    </head>
    <body>
    <g:render template="/informationBar"/>
    
    <g:render template="/menu"/>
    
        <div class="body">
            <h1>Lista de Users</h1>
            <g:if test="${flash.message}">
            <div class="message">${flash.message}</div>
            </g:if>
            <div class="list">
                <table>
                    <thead>
                        <tr>
                        
                        	<g:sortableColumn property="id" title="Id" />
                        
                   	        <g:sortableColumn property="nome" title="Nome" />
                        
                   	        <g:sortableColumn property="Municipio" title="Municipio" />
                        
							<g:sortableColumn property="papel" title="Papel" />
							
							<g:sortableColumn property="telefone" title="Telefone" />
							
							<g:sortableColumn property="email" title="Email" />
                        
                   	    	<g:sortableColumn property="rg" title="Rg" />
                   	    
                        </tr>
                    </thead>
                    <tbody>
                    <g:each in="${userInstanceList}" status="i" var="userInstance">
                        <tr class="${(i % 2) == 0 ? 'odd' : 'even'}">
                        
                            <td><g:link action="show" id="${userInstance.id}">${fieldValue(bean:userInstance, field:'id')}</g:link></td>
                        
                            <td>${fieldValue(bean:userInstance, field:'nome')}</td>
                            
                            <td>${fieldValue(bean:userInstance, field:'municipio')}</td>
                            
                            <td>${fieldValue(bean:userInstance, field:'papel')}</td>
                        
                            <td>${fieldValue(bean:userInstance, field:'telefone')}</td>
                        
                            <td>${fieldValue(bean:userInstance, field:'email')}</td>
                        
                            <td>${fieldValue(bean:userInstance, field:'rg')}</td>
                        
                        </tr>
                    </g:each>
                    </tbody>
                </table>
            </div>
            <div class="paginateButtons">
                <g:paginate total="${userInstanceTotal}" />
            </div>
        </div>
    </body>
</html>
